namespace CollegeReviewMVC.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class Renamed_UserId_to_ReviewId : DbMigration
    {
        public override void Up()
        {
            DropForeignKey("dbo.Colleges", "College_CollegeId", "dbo.Colleges");
            DropIndex("dbo.Colleges", new[] { "College_CollegeId" });
            DropPrimaryKey("dbo.Reviews");
            DropColumn("dbo.Reviews", "UserId");
            AddColumn("dbo.Reviews", "ReviewId", c => c.Int(nullable: false, identity: true));
            AddPrimaryKey("dbo.Reviews", "ReviewId");
            DropColumn("dbo.Colleges", "College_CollegeId");
       
        }
        
        public override void Down()
        {
            AddColumn("dbo.Reviews", "UserId", c => c.Int(nullable: false, identity: true));
            AddColumn("dbo.Colleges", "College_CollegeId", c => c.Int());
            DropPrimaryKey("dbo.Reviews");
            DropColumn("dbo.Reviews", "ReviewId");
            AddPrimaryKey("dbo.Reviews", "UserId");
            CreateIndex("dbo.Colleges", "College_CollegeId");
            AddForeignKey("dbo.Colleges", "College_CollegeId", "dbo.Colleges", "CollegeId");
        }
    }
}
